package main

import (
	"gosudoku/solver"
	"log"
	"os"
)

// go run . 003020600900305001001806400008102900700000008006708200002609500800203009005010300

func SampleSwordfish() {
	in := `
	095 074 208
	000 000 549
	804 095 070

	918 006 457
	547 918 002
	006 457 981

	080 000 000
	000 000 000
	001 043 090
		`
	g := solver.Grid{}
	g.Input(in)
	g.Init()
	g.Clearup()

	g.Solve()
	//g.PrintGrid()
}

func Solve() {
	g := solver.Grid{}
	err := g.CheckInput()
	if err != nil {
		os.Exit(1)
	}
	g.Input(os.Args[1])
	g.Init()
	g.PrintGrid()

}

type Discurd struct{}

func (Discurd) Write(p []byte) (n int, err error) {
	return
}

func main() {
	d := Discurd{}
	log.SetOutput(d)
	SampleSwordfish()
	//Solve()
}
